<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <ul id="ul"></ul>
  <button id="btn">确认</button>

  <script>
    let arr = ['html', 'css', 'js', 'vue']
    arr.forEach((item, index, arr) => {
      let li = document.createElement('li')
      li.innerText = item
      document.querySelector('#ul').appendChild(li)
    })
    
    document.getElementById('btn').addEventListener('click', function () {
      this.innerHTML = '提交'
    })
  </script>
</body>
</html>